#include "Vector4.h"
#include "Vector3.h"
#include <math.h>
#include <iostream>

using namespace std;


Vector4::Vector4(float n_x, float n_y, float n_z, float n_w)
{
    x = n_x;
    y = n_y;
    z = n_z;
    w = n_w;
}

Vector4::Vector4() {
	setVector(0, 0, 0, 0);
}

Vector4::Vector4(const Vector4& newVector) {
	setVector(newVector.x, newVector.y, newVector.z, newVector.w);
}

void Vector4::setVector (float new_x, float new_y, float new_z, float new_w) {
	x = new_x;
	y = new_y;
	z = new_z;
	w = new_w;
}

void Vector4::operator=(Vector4 A) {
	x = A.x;
    y = A.y;
    z = A.z;
    w = A.w;
}

Vector4 Vector4::normalize(Vector4 A)
{
    Vector3 vec = Vector3::normalize(Vector3(A.x, A.y, A.z));
    return Vector4(vec.x, vec.y, vec.z, A.w);
}

std::ostream& operator<< (std::ostream& out, const Vector4 A) {
	out << "Vector4: (" << A.x << ", " << A.y << ", " << A.z << ", " << A.w << ")";
	return out;
}
